<script setup lang="ts">
import { getLoginSilent } from '@/utils/http';
import { storeToRefs } from 'pinia';
import { useUserStore } from '@/store';
// import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';

const userStore = useUserStore();
const { userInfo } = storeToRefs(userStore);

onLaunch(async () => {
	if (!userInfo.value.student_id && !uni.getStorageSync('isLogout')) {
		await getLoginSilent();
	}
});
// onShow(() => {
// 	console.log('App Show');
// });
// onHide(() => {
// 	console.log('App Hide');
// });
</script>
<style lang="scss">
	// .w-full {
	// 	padding-bottom: 55rpx;
	// }
</style>
